package Oop.ooptest.test05;

public class AnimalTest {
    public static void main(String[] args) {
        cat c = new cat();
        c.age=10;
        c.color="红色";
        System.out.println(c.age);
        System.out.println(c.color);
        //调用一下函数
        c.eat();
        c.run();
        System.out.println("---------");
        BosiCat bc = new BosiCat();
        bc.age=2;
        bc.color="黄色";
        System.out.println(bc.age);
        System.out.println(bc.color);
        bc.run();
        System.out.println("----------");
        //创建一个pig对象
        pig p = new pig();
        p.age=9;
        p.eat();



    }
}
